
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type MenuRequest struct {

	Component string `json:"component" form:"component"`

	Meta string `json:"meta" form:"meta"`

	Name string `json:"Name" form:"Name"`

	Path string `json:"path" form:"path"`

	Pid string `json:"pid" form:"pid"`

	Redirect string `json:"redirect" form:"redirect"`

}

func (r *MenuRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *MenuRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"component": "required",

		"meta": "required",

		"Name": "required",

		"path": "required",

		"pid": "required",

		"redirect": "required",

	}
}

func (r *MenuRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *MenuRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *MenuRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
